<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{ keyword }} - socialcredits</title>

    <link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <style type="text/css">

        .main {
            font-size: 3em;
        }

        .key {
            color: #ff0000;
        }

        .result_item {
            margin-left: 20px;
            margin-right: 20px;
        }

        .result_item h4 {
            text-decoration: underline;
        }
    </style>
</head>
<body>

<div class="main">

<b>您目前搜索条件为：<span class="key">{{ keyword }}</span>，共搜索到{{ total }}条记录。</b>

        <hr style="border: 1px solid #555;">

    {% for item in data %}
        <div class="result_item">
            <span><b>
                <a href="{{ url_for('wechat.detail', sid=item.id) }}" style="text-decoration: underline">{{ item.title }}</a>
            </b></span>

            <p><span class="time">{{ item.releaseTime }} - </span> {{ item.description|safe }} </p>

            <p>{{ item.stockCode }} - {{ item.companyShortName }}
                {% if item.type %}
                    - {{ item.type }}
                {% endif %}
            </p>
        </div>
        <hr style="border: 1px solid #555;">
    {% endfor %}
    <nav style="text-align: center;font-size: 2em">
        <ul class="pagination">
            <li>
                <a href="/wechat/search/{{ keyword }}/{{ pages[0] }}" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            {% for page in pages[3:] %}
                {% if page == pages[2] %}
                    <li class="active"><a href="/wechat/search/{{ keyword }}/{{ page }}">{{ page }}</a></li>
                {% else %}
                    <li><a href="/wechat/search/{{ keyword }}/{{ page }}">{{ page }}</a></li>
                {% endif %}
            {% endfor %}
            <li>
                <a href="/wechat/search/{{ keyword }}/{{ pages[1] }}" aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
        </ul>
    </nav>
</div>

</body>
</html>
